import React, { useEffect, useState } from 'react'
import { getListApi } from '../../api/tick'

const Home = () => {
    const [list, setList] = useState([])
    const getData = async () => {
        const resp = await getListApi()
        console.log(resp);
        setList(resp.data)
    }
    useEffect(() => {
        getData()
    }, [])
    return (
        <div>
            首页
            {
                list.map((v,i)=>{
                    return <dl key={i}>
                     <dt>
                      <div>{v.start}</div>
                      <div>{v.end}</div>
                     </dt>
                    </dl>
                })
            }
        </div>
    )
}

export default Home
